package com.nn.smart.bus.async;

import com.nn.smart.bus.feign.UserFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * 用户部门相关任务
 *
 * @author nanning
 * @date 2019/11/28 13:20
 */
@Component
public class UserDeptTask {

    @Autowired
    private UserFeignClient userFeignClient;

    /**
     * 组装用户部门层级结构
     *
     * @param userId
     * @author nanning
     * @date 2019/11/28 13:21
     */
    @Async
    public void packageUserDeptOptions(Long userId) {
        userFeignClient.packageUserDeptOption(userId);
    }
}
